Skip to content

GetJsonValueByKey throws better message#193

Merged
kanbouchou merged 2 commits intomujin:masterfrom
y423610m:20260304_improveErrorMessage
Mar 5, 2026
Merged

GetJsonValueByKey throws better message#193
kanbouchou merged 2 commits intomujin:masterfrom
y423610m:20260304_improveErrorMessage

Conversation

@y423610m
Copy link

@y423610m y423610m commented Mar 4, 2026

GetJsonValueByKey can throw better message like openrave's one.
https://github.com/rdiankov/openrave/blob/master/include/openrave/openravejson.h#L933

@kanbouchou kanbouchou self-requested a review March 5, 2026 02:18
@kanbouchou
Copy link
Contributor

@y423610m change looks good, please provide change log and version bump.

@y423610m
Copy link
Author

y423610m commented Mar 5, 2026

sample of improved error message when type is different..

MujinControllerCommon (JSONError): Cannot get value of non-object ("Array") for key "use".

@kanbouchou kanbouchou merged commit cb55541 into mujin:master Mar 5, 2026
@kanbouchou
Copy link
Contributor

Thanks. Tested with integrated tests, saw no regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants